import request from '@/utils/request'

// 获取来料报检任务列表
export function inspectionlot(data) {
	return request({
		url: `/api/Business/inspectionlot`,
		method: 'get',
		data,
		options: {
			load: false
		}
	})
}

//详情
export function getInfo(id) {
	return request({
		url: `/api/Business/inspectionlot/${id}`,
		method: 'get',
		options: {
			load: false
		}
	})
}
//详情列表
export function getInspectionList(code) {
	return request({
		url: `/api/Business/Inspectionitem/${code}`,
		method: 'get',
		options: {
			load: false
		}
	})
}

//单条保存
export function inspectionitem(data) {
	return request({
		url: `/api/Business/inspectionitem`,
		method: 'post',
		data,
		options: {
			load: false
		}
	})
}

//检验任务保存
export function saveinspectionlot(data) {
	return request({
		url: `/api/Business/inspectionlot`,
		method: 'put',
		data,
		options: {
			load: false
		}
	})
}

//检验任务提交
export function submitinspectionlot(data) {
	return request({
		url: `/api/Business/inspectionlot`,
		method: 'post',
		data,
		options: {
			load: false
		}
	})
}

// 修改抽检数量
export function SamplingQty(data){
	return request({
		url:'/api/Business/Inspectionitem/SamplingQty',
		method: 'put',
		data,
		options: {
			load: false
		}
	})
}

// 获取所有启用的检验项目列表
export function GetInspectionPro(){
	return request({
		url:'/api/BaseData/innspectionitems/All',
		method:'get',
		options:{
			load:false
		}
	})
}

// 获取所有启用的检验条目列表
export function GetInspectionItem(){
	return request({
		url:'/api/BaseData/innspectionentry/All',
		method:'get',
		options:{
			load:false
		}
	})
}

// 获取所有检验方法
export function GetInspectionMethod(){
	return request({
		url:'/api/BaseData/innspectionmethod/ALL',
		method:'get',
		options:{
			load:false
		}
	})
}

// 提交抽样方案表单
export function SubmitsamplingType(data){
	return request({
		url:'/api/Business/Inspectionitem/addItem',
		method:'post',
		data,
		options:{
			load:false
		}
	})
}
